#include "GuiPauseMenu.hpp"
#include "GuiIngame.hpp"
#include "GuiMainMenu.hpp"
#include "GuiButtonMenu.hpp"

GuiPauseMenu::GuiPauseMenu(Core *core)
{
    m_core = core;
    m_width = WINDOW_WIDTH;
    m_height = WINDOW_HEIGHT;
    initGui();
}

GuiPauseMenu::~GuiPauseMenu()
{

}

void GuiPauseMenu::initGui()
{
    buttonList.push_back(new GuiButtonMenu(0, m_width/2- 100, m_height/2, 200, 40, "Reprendre", 0));
    buttonList.push_back(new GuiButtonMenu(1, m_width/2- 100, m_height/2+40, 200, 40, "Options", -1));
    buttonList.push_back(new GuiButtonMenu(2, m_width/2- 100, m_height/2+80, 200, 40, "Quitter",0));
    GuiScreen::initGui();
}

void GuiPauseMenu::drawScreen()
{
    GuiScreen::drawScreen();
}

void GuiPauseMenu::onGuiClosed()
{

}

void GuiPauseMenu::updateScreen()
{

}

void GuiPauseMenu::actionPerformed(GuiButton*guiButton)
{
    switch (guiButton->getId())
    {
        case 0:
            m_core->displayScreen(new GuiIngame(m_core));
        break;
        case 2:
            m_core->quitWorld();
        break;
    }
}

bool GuiPauseMenu::doesGuiPauseGame()
{
    return true;
}
